package com.lc.config;

/**
 * 异常编号枚举类
 */
public enum CommonErrorCode implements ErrorCode {
    //用户相关 以 1000 开头
    E_1000(1000, "请传入用户名或密码"),
    E_1001(1001, "用户名错误"),
    E_1002(1002, "密码错误"),
    E_1003(1003, "添加失败"),
    E_1004(1004, "该用户不存在"),
    E_1005(1005, "旧密码错误"),
    E_1006(1006, "修改失败,请联系管理员!"),
    E_1007(1007, "用户注册失败!"),
    E_1008(1007, "注册密码时出错!");

    private int code;
    private String desc;

    CommonErrorCode(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }


    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
